import TabsView from '@/layouts/tabs/TabsView'
import BlankView from '@/layouts/BlankView'
import PageView from '@/layouts/PageView'

// 路由配置
const options = {
	routes: [{
			path: '/login',
			name: '登录页',
			component: () => import('@/pages/login')
		},
		{
			path: '*',
			name: '404',
			component: () => import('@/pages/exception/404'),
		},
		{
			path: '/403',
			name: '403',
			component: () => import('@/pages/exception/403'),
		},
		{
			path: '/',
			name: '首页',
			component: TabsView,
			redirect: '/login',
			children: [
				{
					path: 'extension',
					name: '成员管理',
					meta: {
						icon: 'form',
						page: {
							cacheAble: false
						}
					},
					component: PageView,
					children: [
						{
							path: 'member',
							name: '成员管理',
							component: () => import('@/pages/extension/member/member'),
						},
						// {
						// 	path: 'accounts',
						// 	name: '账号管理',
						// 	component: () => import('@/pages/extension/accounts/accounts'),
						// },
						{
							path: 'personal',
							name: '个人中心',
							component: () => import('@/pages/extension/personal/personal'),
						}
					]
				},
				{
					path: 'order',
					name: '订单情况',
					meta: {
						icon: 'table'
					},
					component: PageView,
					children: [{
							path: 'OrderList',
							name: '订单列表',
							meta: {
								authority: 'queryForm',
							},
							component: () => import('@/pages/order/OrderList'),
						},

						{
							path: 'OverdueList',
							name: '逾期订单',
							component: () => import('@/pages/order/OverdueList'),
						}
					]
				},
				{
					path: 'goods',
					name: '推广管理',
					meta: {
						icon: 'form',
					},
					component: PageView,
					children: [{
							path: 'channel',
							name: '渠道推广',
							component: () => import('@/pages/goods/channel'),
						},
						{
							path: 'goodslist',
							name: '商品推广',
							component: () => import('@/pages/goods/goodslist'),
						}
					]
				},
				{
					path: 'account',
					name: '财务管理',
					meta: {
						icon: 'check-circle-o',
					},
					component: PageView,
					children: [{
							path: 'my',
							name: '我的账户',
							component: () => import('@/pages/account/my')
						},
						{
							path: "withdraw",
							name: "提现记录",
							component: () => import("@/pages/account/withdraw"),
							meta:{
								invisible: true,
							}
						},
						{
							path: 'settlement',
							name: '结算中心',
							component: () => import('@/pages/account/settlement')
						},
						{
							path: 'Withdrawal',
							name: '流水记录',
							component: () => import('@/pages/account/Withdrawal')
						}
					]
				},
				{
					path: 'exception',
					name: '异常页',
					meta: {
						icon: 'warning',
						invisible: true

					},
					component: BlankView,
					children: [{
							path: '404',
							name: 'Exp404',
							component: () => import('@/pages/exception/404')
						},
						{
							path: '403',
							name: 'Exp403',
							component: () => import('@/pages/exception/403')
						},
						{
							path: '500',
							name: 'Exp500',
							component: () => import('@/pages/exception/500')
						}
					]
				}
			]
		},
	]
}

export default options
